package org.colcon.web.model.title;

import java.util.HashMap;
import java.util.Map;

import org.colcon.web.model.Group;
import org.colcon.web.model.Model;
import org.colcon.web.model.Title;
import org.colcon.web.model.framework.IPower;
import org.colcon.web.model.power.CreateGroupPower;
import org.colcon.web.model.power.CreateTitlePower;

public class MemberTitle extends Title 
{
	private static final long serialVersionUID = 5308578384669137259L;
	
	public MemberTitle()
	{
		this(new HashMap<String, String>());
	}
	
	public MemberTitle(Map<String, String> args)
	{
		this(args.get(GROUP));
	}
	
	public MemberTitle(String group)
	{
		super(
				Model.getTitleContainer(group), 
				Group.MEMBER, 
				"a user who is part of the group " + group, 
				-1,
				new String[0],
				new IPower[]
				{
					new CreateGroupPower(),
					new CreateTitlePower(group)
				}
		);
	}
}
